package cn.org.xwb.bookmall.admin.vo;

import cn.org.xwb.bookmall.model.constant.ProductConst;
import cn.org.xwb.bookmall.model.po.ProductOptions;
import cn.org.xwb.bookmall.model.po.ProductParam;
import cn.org.xwb.common.encrypt.annotation.rsa.RsaDe;
import cn.org.xwb.common.valid.annotation.nu.NotNull;
import cn.org.xwb.common.valid.annotation.str.StrMaxLen;
import cn.org.xwb.common.valid.annotation.str.StrNotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class UploadProductVo implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @StrNotNull
    @RsaDe
    private String account;

    private Long id;

    @StrNotNull
    @RsaDe
    @StrMaxLen(ProductConst.PRODUCT_TITLE_MAX_LEN)
    private String title;

    @NotNull
    private Long productCategoryId;

    @NotNull
    private Long productCategorySubId;

    @NotNull
    private Double freight;

    /**
     * 是否删除
     */
    private Boolean isRemove;

    /**
     * 图书编码
     */
    @StrNotNull
    @RsaDe
    private String code;

    @StrNotNull
    @RsaDe
    @StrMaxLen(ProductConst.PRODUCT_DELIVERY_MAX_LEN)
    private String delivery;

    @StrNotNull
    @RsaDe
    @StrMaxLen(ProductConst.PRODUCT_ADDRESS_MAX_LEN)
    private String address;

    @RsaDe
    private String descriptionMd;

    @RsaDe
    private String descriptionHtml;

    private List<String> imgList;

    private List<String> labelNames;

    private List<ProductParam> params;

    private List<ProductOptions> options;


}
